<template>
    <div>
        <div class="flex-col page">
  <div class="justify-between header">
    <div class="left-image-wrapper flex-col items-center view">
    </div>
    <div class="flex-col text-wrapper">
      <span>MYDATA</span>
    </div>
    <div class="left-image-wrapper flex-col items-center">
    </div>
  </div>
  <div class="flex-col group">
    <div class="flex-row group_1">
      <div class="text_1" :style="{ 'border' : (bolen1 ? 'solid white' : '') }">
        <span>MONTH</span>
      </div>
      <span class="text_2" :style="{ 'border' : (bolen2 ? 'solid white' : '') }">WEEK</span>
      <span class="text_3" :style="{ 'border' : (bolen3 ? 'solid white' : '') }">DAY</span>
    </div>
    <div class="flex-col group_2">
      <div class="flex-col section_1">
        <div class="justify-center group_3">
          <div class="section_2 view_4"></div>
          <div class="section_2"></div>
          <div class="section_2"></div>
          <div class="section_2"></div>
          <div class="section_2"></div>
          <div class="section_2"></div>
          <div class="flex-col image-wrapper">
            <img
              src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111336744319615.png"
              class="image_2"
            />
          </div>
        </div>
        <div class="justify-between group_4">
          <div class="text-wrapper_2 flex-col items-center">
            <span>1</span>
          </div>
          <div class="text-wrapper_2 flex-col items-center">
            <span>5</span>
          </div>
          <div class="flex-col">
            <span>10</span>
          </div>
          <div class="flex-col">
            <span>15</span>
          </div>
          <div class="flex-col">
            <span>20</span>
          </div>
          <div class="flex-col">
            <span>25</span>
          </div>
          <div class="flex-col">
            <span>30</span>
          </div>
        </div>
      </div>
      <div class="flex-col section_3">
        <div class="justify-between group_5">
          <img
            src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111336753479479.png"
            class="image_3 image_4"
          />
          <span class="text_8">75%</span>
        </div>
        <img
          src="https://project-user-resource-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111365189525059.png"
          class="image_5"
        />
        <span class="text_18">165</span>
        <span class="text_8 text_19">观看课程时长</span>
      </div>
      <div class="flex-col section_4">
        <div class="justify-between group_6">
          <img
            src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111336759790992.png"
            class="image_3"
          />
          <span class="text_8">15%</span>
        </div>
        <div class="flex-col group_7">
          <div class="flex-col image-wrapper_1">
            <img
              src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111336755517239.png"
              class="image_7"
            />
          </div>
          <span class="text_21">40</span>
          <span class="text_8 text_22">锻炼时长</span>
        </div>
      </div>
    </div>
  </div>
</div>
    </div>
</template>

<script>
export default {
  data () {
    return {
      show: false,
      bolen1: true,
      bolen2: false,
      bolen3: false,
    }
  },
  mounted() {
    document.addEventListener("keydown", this.showPopup);
    this.$store.commit('add','my_data')
  },
  destroyed(){
    document.removeEventListener("keydown", this.showPopup)
  },
  methods:{
    showPopup(e){
      var key = window.event ? e.keyCode : e.which;
      if (this.show == true) {
        switch (key) {
        }
      }else{
        switch(key) {
          case 37:
            if(this.bolen1 == true){
              alert('无法向右')
              break;
            }
            if(this.bolen2 == true){
              this.bolen2 = false;
              this.bolen1 = true;
              break;
            }
            if(this.bolen3 == true){
              this.bolen3 = false;
              this.bolen2 = true;
              break;
            }
          case 39:
            if(this.bolen1 == true){
              this.bolen1 = false;
              this.bolen2 = true;
              break;
            }
            if(this.bolen2 == true){
              this.bolen2 = false;
              this.bolen3 = true;
              break;
            }
            if(this.bolen3 == true){
              alert('无法向左')
              break;
            }
        }
      }
    }
  }
}
</script>

<style scoped>
.left-image-wrapper {
  width: 3.25rem;
}
.center-group {
  overflow-x: hidden;
}
.text_8 {
  opacity: 0.4;
}
.text_4 {
  opacity: 0.1;
}
.section_2 {
  margin-left: -3.25rem;
  background-color: rgba(0, 0, 0, 0.1);
  width: 0.063rem;
  height: 7.81rem;
}
.text-wrapper_2 {
  width: 1.22rem;
}
.image_3 {
  width: 0.69rem;
  height: 0.38rem;
}
.page {
  background-color: rgb(222, 222, 222);
  width: 100%;
  height: 100%;
  overflow-y: auto;
  min-height: 100vh;
}
.header {
  padding: 2.09rem 0.094rem 0.72rem 0.13rem;
  color: rgb(0, 0, 0);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 0.5rem;
  letter-spacing: 0.25rem;
  white-space: nowrap;
  height: 3.88rem;
}
.group {
  padding-top: 0.75rem;
  flex: 1 1 auto;
  overflow-y: auto;
}
.view {
  margin: 0.19rem 0 0.25rem;
}

.group_1 {
  padding: 0 2.03rem;
}
.view_2 {
  margin-top: 2.06rem;
}
.group_2 {
  margin-top: 1.94rem;
  padding-top: 9.81rem;
  position: relative;
}
.image {
  width: 1.09rem;
  height: 0.63rem;
}
.image_1 {
  width: 1.06rem;
  height: 1.06rem;
}

.text_1 {
  padding: 0.2rem;
  margin-left: 1.5rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 0.41rem;
  letter-spacing: 0.11rem;
  white-space: nowrap;
}

.text_2 {
  padding: 0.2rem;
  margin-left: 3rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 0.41rem;
  letter-spacing: 0.11rem;
  white-space: nowrap;
}
.text_3 {
  padding: 0.2rem;
  margin-left: 3rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 0.41rem;
  letter-spacing: 0.11rem;
  white-space: nowrap;
}
.text_9 {
  margin-top: 0.88rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  line-height: 0.44rem;
  white-space: nowrap;
}
.section_1 {
  padding: 5.5rem 0 1.75rem;
  color: rgb(0, 0, 0);
  font-size: 0.69rem;
  line-height: 0.47rem;
  letter-spacing: 0.069rem;
  white-space: nowrap;
  background-image: linear-gradient(165deg, rgb(222, 255, 201) 0%, rgb(163, 248, 255) 100%);
}
.section_3 {
  padding: 1.09rem 0.34rem 1.38rem 1.22rem;
  box-shadow: 0px 1.88rem 3.13rem rgba(0, 0, 0, 0.15);
  background-color: rgb(255, 255, 255);
  width: 8.44rem;
  position: absolute;
  left: 2.03rem;
  top: 1.38rem;
}
.section_4 {
  padding: 1.09rem 0.56rem 1.38rem 1.22rem;
  box-shadow: 0px 1.88rem 3.13rem rgba(0, 0, 0, 0.15);
  background-color: rgb(255, 255, 255);
  width: 10.94rem;
  position: absolute;
  right: 2.03rem;
  top: 0;
}
.text_5 {
  margin-left: -1.53rem;
  color: rgb(0, 0, 0);
  font-size: 3.13rem;
  font-weight: 700;
  line-height: 2.28rem;
  letter-spacing: 0.31rem;
  white-space: nowrap;
}
.text_6 {
  margin-left: 1.22rem;
  color: rgb(0, 0, 0);
  font-size: 3.13rem;
  font-weight: 700;
  line-height: 2.22rem;
  letter-spacing: 0.31rem;
  white-space: nowrap;
}
.text_7 {
  margin-left: 1.47rem;
  margin-right: -2.66rem;
  color: rgb(0, 0, 0);
  font-size: 3.13rem;
  font-weight: 700;
  line-height: 2.19rem;
  letter-spacing: 0.31rem;
  white-space: nowrap;
}
.group_3 {
  padding: 0 3.72rem;
  position: relative;
}
.group_4 {
  margin-top: 1.66rem;
  padding-left: 1.59rem;
  padding-right: 1.31rem;
}
.group_5 {
  color: rgb(0, 0, 0);
  font-size: 0.69rem;
  line-height: 0.47rem;
  letter-spacing: 0.069rem;
  white-space: nowrap;
}
.image_5 {
  margin-top: 0.94rem;
  align-self: center;
  border-radius: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
}
.text_18 {
  margin-right: 0.44rem;
  margin-top: 1.22rem;
  align-self: flex-end;
  color: rgb(0, 0, 0);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.84rem;
  letter-spacing: 0.25rem;
  white-space: nowrap;
}
.text_19 {
  margin-top: 1.06rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  line-height: 0.44rem;
  white-space: nowrap;
}
.group_6 {
  color: rgb(0, 0, 0);
  font-size: 0.69rem;
  line-height: 0.47rem;
  letter-spacing: 0.069rem;
  white-space: nowrap;
}
.group_7 {
  margin-top: 1.84rem;
  padding-left: 2.16rem;
  padding-right: 1.38rem;
}
.view_4 {
  margin-left: 0;
}
.image-wrapper {
  padding: 4.56rem 0 0.25rem;
  filter: drop-shadow(0px 1.56rem 1.56rem rgba(0, 0, 0, 0.4));
  background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/622f14ff5a7e3f031097a4ba/622f1ab14fa9330011966385/16474111336683921828.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: absolute;
  left: 0;
  right: 0;
  top: 0.63rem;
}
.image_4 {
  margin-top: 0.13rem;
}
.image-wrapper_1 {
  padding-bottom: 1.56rem;
  align-self: center;
  background-color: rgb(0, 0, 0);
  border-radius: 1.56rem;
  width: 3.13rem;
}
.text_21 {
  margin-top: 1.63rem;
  align-self: center;
  color: rgb(0, 0, 0);
  font-size: 3.13rem;
  font-weight: 700;
  line-height: 2.28rem;
  letter-spacing: 0.31rem;
  white-space: nowrap;
}
.text_22 {
  margin-top: 1.5rem;
  color: rgb(0, 0, 0);
  font-size: 0.56rem;
  line-height: 0.47rem;
  white-space: nowrap;
}
.image_2 {
  margin-left: 4.88rem;
  width: 0.94rem;
  height: 0.94rem;
}
.image_7 {
  width: 1.56rem;
  height: 1.56rem;
}
</style>
